<template>
	<view>
		<z-paging ref="paging"  v-model="dataList" @query="queryList">
			<view class="alistItem" v-for="(item,index) in dataList" :key="item.id"  @tap="needLoginToNav('/pages/my/personSave?id='+item.id)">
				<view class="label">{{item.name}}</view>
				<u-icon name="arrow-right"></u-icon>
				
			</view>
			<template #bottom> 
				<view class="addBtn" @tap="needLoginToNav('/pages/my/personSave')">+</view>
			</template>
		</z-paging>
	</view>
</template>

<script>
	import api from '@/api.js'
	import helper from '../../common/helper'
	export default {
		mixins:[helper],
		data() {
			return {
				dataList:[]
			}
		},
		
		methods: {
			queryList(page,limit){
				var query={page:page,limit:limit}
				api.doRequest('get','my/personList',query).then(res=>{
					
					let data=res.data.data;
					this.$refs.paging.complete(data);
				})
			},
			reloadCurrentList(){
				this.$refs.paging.reload();
			}
		}
	}
</script>

<style>
.alistItem{
	width:710upx;
	padding:0 20upx;
	height:80upx;
	border-bottom:1upx solid #ccc;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.addBtn{
	width:100upx;
	height:100upx;
	background:#004ea2;
	border-radius:50upx;
	display: flex;
	align-items: center;
	justify-content: center;
	color:#fff;
	margin:40upx;
}
</style>
